The invention relates to effecting video transitions between video streams.
In editing of video in the creation of a video program, it is often desirable to provide a gradual transition from one video stream to another video stream. For example, in a wipe transition, a line may move across the screen from left to right, with the old scene gradually disappearing at the right while more and more of the new scene appears at the left. In a so-called "iris wipe," the boundary is an expanding circle, and one video stream appears in an expanding circle, and the other is outside of the circle. A solid color could also be used as one stream to provide an image that gradually appears or disappears across the screen or an image that gradually expands or contracts.
Referring to FIG. 1, transitions can be created at a video combiner 10 having a first video input 12 for a first video stream, a second video input 14 for a second video stream, a key input 16 to receive key values indicating how the two inputs are to be combined, and a video output 18 for the output video that is some combination of the two inputs. The video streams include frames (each frame providing an image for a screen) made up of horizontal lines, each of which includes individual "pixels" (picture elements) across the line. Each pixel value includes a number of bit values that describe the color and intensity at that particular pixel at a particular time. New frames are provided at the video rate, e.g., 30 frames per second, and the video streams include sequential digital data describing sequential pixel values for lines of video data in a frame. The pixels for the first and second video streams that are input to combiner 10 are synchronized, as are the associated key values. The key value for a given pixel indicates whether the output for that pixel is the input from one stream or the other stream or a combination of the two.
While a unique key value could be stored and accessed for each pixel in each frame, to reduce bandwidth, a single table of gamma values (also referred to as gradient values herein) can be used. For example, a single table with one value for each pixel can be used to define the wipe over the sequence of frames. In the table, the gamma value essentially indicates the time at which the transition appears at that pixel. FIG. 2 is a simplified diagram of a table of gamma values 20 for an iris wipe of a square (instead of circular) transition. (A real table for NTSC would have 720 horizontal entries and 480 vertical entries.) As the time goes from frames 1 to 2 to 3 etc, a "threshold" value similarly goes from 1 to 2 to 3 etc (or 1, 1, 2, 2, 3, 3 or 1, 2, 3, 3, 4 to spread things out, though the latter example would not be uniform). The threshold is compared to the value in the table to determine the key value (e.g., a 0 key value meaning all of video stream A, a 100 key value meaning all of video stream B, and a 50 key value meaning equal amounts of A and B) that is fed to the mixer. The key values that are generated cause the video output to switch over from one video input to the other. As the threshold increases, the boundary of the transition provided by use of the FIG. 2 table expands. The following algorithm employs a direct comparison that provides an abrupt transition as the threshold goes from 0 to 4, as shown in displays 22, 24, 26, 28, 30 in FIGS. 3A-3E, respectively.
If (gradient&lt;threshold)
then wipe=transparent PA1 wipe=opaque PA1 wipe=transparent PA1 wipe=1/2 *opaque*(1-(threshold-gradient)/N) PA1 wipe=1/2 *opaque*(1+(gradient-threshold)/N) PA1 wipe=opaque
else
"Softness" can be added to the key values generated so that the change from one video to the other is not abrupt but instead is gradual (with decreasing amounts of one video stream and increasing amounts of another) in a discrete number of adjacent pixels as the transition passes a pixel location. For example, the following algorithm can be used to produce a gradual transition region N pixels wide.
If (gradient&lt;(threshold-N) then
else if (gradient&gt;=(threshold-N) AND (gradient&lt;threshold) then
else if (gradient&gt;=threshold) AND (gradient&lt;(threshold+N)) then
else if (gradient&gt;=(threshold+N))
With this algorithm, the transition from one video stream to the other is linear, though the human eye sees brightness more as a cube root function. Also, the threshold may only be moved on integer pixel boundaries, which can cause abrupt changes in movement when the wipe moves X pixels in Y frames, and X and Y are not multiples of each other.